package cn.yuyiling.jelly.kg.api;

import cn.yuyiling.jelly.kg.mongodb.entity.KnowledgePoint;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface KnowledgePointService {

    KnowledgePoint createKnowledgePoint(KnowledgePoint knowledgePoint);
    KnowledgePoint getKnowledgePointById(String id);

    KnowledgePoint getKnowledgePointByName(String name);
    List<KnowledgePoint> getAllKnowledgePoints();
    Page<KnowledgePoint> getKnowledgePointsByPage(Pageable pageable);
    KnowledgePoint updateKnowledgePoint(String id, KnowledgePoint knowledgePoint);
    void deleteKnowledgePoint(String id);
    void addTagsToKnowledgePoint(String id, List<String> tags);
    void setCategoryForKnowledgePoint(String id, String category);

    List<KnowledgePoint> getKnowledgePointsByTags(List<String> tags);


    KnowledgePoint viewKnowledgePointById(String id);
    public List<String> get24HourTopKnowledge(int count);
    public void refreshTop24hRanking();
}
